<?php $this->load->view('header/standard'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
            <?php if (isset($messages)) echo $messages; ?>

            <div id="submenu-container" class="span-17 last">
                <?php $this->load->view('menu/profile'); ?>
            </div>

            <form action="" method="post">
            <fieldset class="span-16 last box">
                <legend class="caps"><?=lang('profile.glider.Add')?></legend>
                <?php if (count($gliders) > 0):?>
	            <div class="span-16 last">
	                <p>
						<label for="glider"><?=lang('profile.glider.Glider')?>: </label>
						<?php echo form_dropdown('glider', $gliders); ?>
					</p>
				    <p>
				        <label for="serial"><?=lang('profile.glider.Serial_Number')?>: </label> 
				        <input type="text" name="serial" />
				    </p>
					<p>
						<label for="built">Built: </label> 
						<input type="text" name="built" id="dp0" size="10" maxlength="10" />
					</p>
				    <p>
				        <label for="tested">Last tested made: </label> 
				        <input type="text" name="tested" id="dp1" size="10" maxlength="10" />
				    </p>
                </div>
                <div class="span-16 last">
                    <p><?php echo form_submit('action',lang('profile.glider.Add')); ?></p>
                </div>
                <?php else: ?>
                    <p class="span-15"><?=lang('profile.glider.No_more_gliders_to_add')?></p>
                <?php endif; ?> 
            </fieldset>
            </form>
        </div> <!-- end content -->
        <div class="span-6 last" id="sidebar">
          <?php $this->load->view('menu/sidebar', array('person' => $person, 'context' => 'pilot'))?>
        </div> <!-- end sidebar -->
    </div> <!-- end container -->
    <script type="text/javascript">
        $(function() {
            $("#dp0").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
        });
        $(function() {
            $("#dp1").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
        });
    </script>
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
